package cn.blunce.ScopeTest;

/**
 * Created by BlueSmile on 2016/3/24 0024.
 * <p>
 * Primary type only lives in the scope,
 * but object can always exist,
 * though its handle was destroyed.
 */
public class MyScope {

    public void test() {
        {
            int x = 12;
            //only x available
            System.out.println(x);
            {
                int q = 96;
                //both x and q available
                System.out.println(x);
                System.out.println(q);
            }
            //only x available, q is out of scope
        }
    }
}
